﻿using Core.Domain.Enums;

namespace Core.Identity.Menus.Dtos;

/// <summary>
/// 菜单
/// </summary>
public class MenuDto
{
    /// <summary>
    /// 唯一标识
    /// </summary>
    public required Guid Id { get; set; }
    /// <summary>
    /// 编码
    /// </summary>
    public required string Code { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    public required string Name { get; set; }
    /// <summary>
    /// 分组
    /// </summary>
    public string? Group { get; set; }
    /// <summary>
    /// 父级菜单Id
    /// </summary>
    public Guid? ParentId { get; set; }

    #region 菜单元数据
    /// <summary>
    /// 菜单类型（0:菜单 1:iframe 2:外链 3:按钮）
    /// </summary>
    public int? MenuType { get; set; }
    /// <summary>
    /// 标题
    /// </summary>
    public string? Title { get; set; }
    /// <summary>
    /// 路由名称
    /// </summary>
    public string? RouteName { get; set; }
    /// <summary>
    /// 路径
    /// </summary>
    public string? Path { get; set; }
    /// <summary>
    /// 组件
    /// </summary>
    public string? Component { get; set; }
    /// <summary>
    /// 排序
    /// </summary>
    public int? Rank { get; set; }
    /// <summary>
    /// 重定向
    /// </summary>
    public string? Redirect { get; set; }
    /// <summary>
    /// 图标
    /// </summary>
    public string? Icon { get; set; }
    /// <summary>
    /// 扩展图标
    /// </summary>
    public string? ExtraIcon { get; set; }
    /// <summary>
    /// 进入动画
    /// </summary>
    public string? EnterTransition { get; set; }
    /// <summary>
    /// 离开动画
    /// </summary>
    public string? LeaveTransition { get; set; }
    /// <summary>
    /// 激活路径
    /// </summary>
    public string? ActivePath { get; set; }
    /// <summary>
    /// 外部链接
    /// </summary>
    public string? FrameSrc { get; set; }
    /// <summary>
    /// 加载
    /// </summary>
    public bool? FrameLoading { get; set; }
    /// <summary>
    /// 激活
    /// </summary>
    public bool? KeepAlive { get; set; }
    /// <summary>
    /// 隐藏标签
    /// </summary>
    public bool? HiddenTag { get; set; }
    /// <summary>
    /// 固定标签
    /// </summary>
    public bool? FixedTag { get; set; }
    /// <summary>
    /// 展示链接
    /// </summary>
    public bool? ShowLink { get; set; }
    /// <summary>
    /// 显示菜单
    /// </summary>
    public bool? ShowParent { get; set; }
    #endregion

    /// <summary>
    /// 设置描述
    /// </summary>
    public string? Description { get; set; }
    /// <summary>
    /// 设置启用/禁用
    /// </summary>
    public bool Enabled { get; set; }
    /// <summary>
    /// 排序
    /// </summary>
    public int Sort { get; set; }
    /// <summary>
    /// 权限作用域
    /// </summary>
    public PermissionScope Scope { get; set; }
}
